<template>
	<div>
		<!-- 顶部选项卡 -->
		<scroll-view class="pagecontrol-top-scroll" scroll-x="true" scroll-with-animation
			:scroll-into-view="scrollInto">
			<view class="pagecontrol-top-title">
				<view v-for="(items, index) in itemsArr" :key="index" class="pagecontrol-top-text"
					@click="changeTab(index)" :id="'tab' + index">
					<view :class="tabIndex === index ? 'pagecontrol-top-selected' : 'pagecontrol-top-normal'">
						{{items}}</view>
					<view class="pagecontrol-bottom-line"
						:class="tabIndex === index ? 'pagecontrol-bottom-line-show' : 'pagecontrol-bottom-line-visibility'">
					</view>
				</view>
				<view class="pagecontrol-top-text" @click="goWaybillTrack">
				    <view class="pagecontrol-top-normal">运单跟踪</view>
				    <view class="pagecontrol-bottom-line pagecontrol-bottom-line-visibility"></view>
				</view>
				<view v-if="openMore" @click="openToggle" hover-class="buttonHover"
					style="display: flex;justify-content: center;color: #eb884c;padding-top: 4px;background-color: #eeeeee;height: 26px;width: 62px;">
					更多<view style="background: url('../../../static/waybill/bottom.png') no-repeat;background-size: cover;width: 20px;height: 20px;"></view>
				</view>
				<view v-else @click="closeToggle" hover-class="buttonHover"
					style="display: flex;justify-content: center;color: #eb884c;padding-top: 4px;background-color: #eeeeee;height: 26px;width: 62px;">
					更多<view style="background: url('../../../static/waybill/bottom.png') no-repeat;background-size: cover;width: 20px;height: 20px;"></view>
				</view>
			</view>

		</scroll-view>
		<!-- 内容 -->
		<swiper :duration="150" :current="tabIndex" @change="onChangeTab" :style="'height:' + scrollH + 'px;'">
			<swiper-item v-for="(item_, index_) in itemsArr" :key="index_">
				<scroll-view scroll-y="true" show :style="'height:' + scrollH + 'px;'">
					<view v-if="index_==0" style="padding-bottom: 130px;">
						<!--运单信息-->
						<view style="margin: 10px;background-color: #ffffff;border-radius: 20px 20px 0;">
							<view
								style="border-bottom: 0.5px solid rgb(237, 237, 237);display: flex;align-items: center;justify-content: space-between;">
								<view class="contract"
									style="background-color: #d9d9d9;width: 180px;height: 30px;border-radius: 20px 0 0;font-weight: bold;display: flex;justify-content: center;align-items: center;">
									<uni-tooltip>
										<template slot="default">
											<text style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;width: 150px;text-align: center;word-break: break-all;">
												{{formData.outCode}}
											</text>
										</template>
										<template slot="content" style="display: flex;">
											{{formData.outCode}}
											<text @click="copy(formData.outCode)" class="copy" style="width: 25px;">复制</text>
										</template>
									</uni-tooltip>
								</view>
								<span style="display: flex;">
									<!-- <view
										style="margin-left: 20px;border: 1rpx solid #bf5f09;color:#bf5f09;border-radius: 8px;font-size: 12px;padding: 0px 5px;display: flex;justify-content: center;align-items: center;">
										{{waybillType[formData.waybillType]}}
									</view> -->
									<!-- <view
										style="margin-left: 10px;border: 1rpx solid #bf5f09;color:#bf5f09;border-radius: 8px;font-size: 12px;padding: 0px 5px;display: flex;justify-content: center;align-items: center;">
										中转
									</view> -->
								</span>
								<text style="color: #eb884c;margin-right: 5px;">{{status[formData.status]}}</text>
							</view>
						</view>
						<!--收发货方-->
						<view
							style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;display: flex;flex-direction: row;">
							<view style="width: 50px;display: flex;flex-direction: column;margin-top: 20px;">
								<view
									style="height: 24px;width: 24px;border-radius: 50%;background-color: #464646;color: #ffffff;display: flex;justify-content: center;align-items: center;">
									寄</view>
								<view
									style="height: 126px;width: 1px;border-left: 1rpx dashed #bf6006;margin-left: 11px;">
								</view>
								<view
									style="height: 24px;width: 24px;border-radius: 50%;background-color: #bf6006;color: #ffffff;display: flex;justify-content: center;align-items: center;">
									收</view>
							</view>
							<view style="display: flex;flex-direction: column;width: 100%;">
								<view style="display: flex;width: 100%;height: 130px;">
									<!--发货方-->
									<view style="display: flex;flex-direction: column;width: 100%;">
										<text>{{formData.shipName}}</text>
										<span>
											<text style="font-size: 16px;font-weight: bold;">{{formData.shipContacts}}</text>
											<text style="margin-left: 10px;">{{formData.shipContactTel}}</text>
										</span>
										<span style="font-size: 12px;color: #6f6f6f;">
											{{formData.shipDistrictName}}{{formData.shipAddress}}
										</span>
										<span>
											<text style="font-weight: bold;">发货网点：{{formData.shipNetId}}</text>
											<text style="color: #6f6f6f;">({{formData.shipNetName||'无'}})</text>
										</span>

									</view>
								</view>
								<!--分割线-->
								<view
									style="height: 1px;width: 100%;display: flex;justify-content: center;background-color: #e7e7e7;margin: 10px 0;">
								</view>

								<view style="display: flex;width: 100%;height: 130px;">
									<!--收货方-->
									<view style="display: flex;flex-direction: column;width: 100%;">
										<text>{{formData.deliveryName}}</text>
										<span>
											<text style="font-size: 16px;font-weight: bold;">{{formData.deliveryContacts}}</text>
											<text style="margin-left: 10px;">{{formData.deliveryContactTel}}</text>
										</span>
										<span style="font-size: 12px;color: #6f6f6f;">
											{{formData.deliveryDistrictName}}{{formData.deliveryAddress}}
										</span>
										<span>
											<text style="font-weight: bold;">收货网点：{{formData.deliveryNetId}}</text>
											<text style="color: #6f6f6f;">({{formData.deliveryNetName||'无'}})</text>
										</span>

									</view>
								</view>
							</view>

						</view>
						<!--物品信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">物品信息</text>
							<view v-for="(item2,index2) in formData.goodSourceList" :key="index2" style="display: flex;flex-direction: column;">
								<view
									style="display: flex;justify-content: space-between;margin-top: 10px;font-size: 12px;">
									<text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">{{item2.goodsName}}</text>
									<text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">{{goodsType[item2.goodsType]}}</text>
									<text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">{{packingType[item2.packingType]}}</text>
									<text style="background-color: #feecd9;padding: 2px;border-radius: 4px;">{{item2.num||'0'}}件 {{item2.weight||'0'}}吨 {{item2.bulk||'0'}}立方米</text>
									<!-- <text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">按重量</text> -->
									<!-- <text
										style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">3500元</text> -->
								</view>
							</view>
							<!-- <view style="margin-top: 10px;">			
								<myfilepicker  @clickFile="clickFile"  readonly limit="3"  :value="fileList[index]" file-extname="pdf,png,gif,jpg,jpeg,doc,docx" file-mediatype="all"></myfilepicker>
							</view> -->
						</view>
						<!--发货网点信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<view
								style="display: flex;flex-direction: column;width: 100%;font-size: 12px;color: #6f6f6f;">
								<view style="display: flex;justify-content: space-between;">
									<text>发货网点【发车】</text>
									<text>计划发货时间：{{formData.shipPlanTime?formData.shipPlanTime:'--'}}</text>
								</view>
								<view style="display: flex;justify-content: space-between;">
									<text>上门提货</text>
									<text>预约时间：{{formData.shipPlanTime?formData.shipPlanTime:'--'}}</text>
								</view>
								<view style="display: flex;justify-content: space-between;">
									<text>收货地址【到达】</text>
									<text>计划到达时间：{{formData.deliveryPlanTime?formData.deliveryPlanTime:'--'}}</text>
								</view>
								<view style="display: flex;justify-content: space-between;">
									<text>送货上门</text>
									<text>预计时间：{{formData.deliveryAppointmentTime?formData.deliveryAppointmentTime:'--'}}</text>
								</view>
							</view>
						</view>
						<!--相关服务-->
						<view  style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">相关服务</text>
							<view v-if="formData.waybillValueAdd"
								style="display: flex;flex-wrap: wrap;margin: 0 auto;width: 100%;color: #6f6f6f;font-size: 12px;">
								<view  v-if="formData.goodSourceList.packingService=='1'"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">包装服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.loadingFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">装货服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.unloadFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">卸装服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.parcelInsuranceFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">保险投保</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.drayage)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">短驳服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.carryFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">搬运服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.receiptFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">回单服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.agentBusinessFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">代收贷款</text>
									</view>
								</view>
							</view>
						</view>
						<!--费用信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">费用信息</text>
							<view
								style="display: flex;flex-direction: column;width: 100%;color: #6f6f6f;margin: 8px;font-size: 12px;">
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>总运费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.totalCarriageFee?formData.totalCarriageFee:0).toFixed(2)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>总包装费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.totalPackingFee?formData.totalPackingFee:0).toFixed(2)}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>提货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.shipPickUpFee?formData.shipPickUpFee:0).toFixed(2)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>送货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.deliveryPickUpFee?formData.deliveryPickUpFee:0).toFixed(2)}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>短驳费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.drayage:0).toFixed(2)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>回单费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.receiptFee:0).toFixed(2)}}</text>
									</span>
									<!-- <span style="display: flex;width: 50%;">
										<text>安装费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.installationFee:0)}}</text>
									</span> -->
								</view>
								<!-- <view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>加工费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.processFee:0)}}</text>
									</span>
								</view> -->
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>仓储费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.warehouseFee:0).toFixed(2)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>装货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.loadingFee:0).toFixed(2)}}</text>
									</span>
									
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>卸货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.unloadFee:0).toFixed(2)}}</text>
									</span>
									<!-- <span style="display: flex;width: 50%;">
										<text>搬运费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.carryFee:0)}}</text>
									</span> -->
									<span style="display: flex;width: 50%;">
										<text>保价费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.parcelInsuranceFee:0).toFixed(2)}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>其他费用</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.otherFee:0).toFixed(2)}}</text>
									</span>
								</view>
							</view>
							<!--分割线-->
							<view
								style="height: 1px;width: 100%;display: flex;justify-content: center;background-color: #e7e7e7;margin: 10px 0;">
							</view>
							<view style="display: flex;">
								<span style="color: #6f6f6f;margin-left: 8px;">
									<text>总费总计：</text>
									<text  style="margin-left: 10px;">￥{{totalPrice}}</text>
								</span>
							</view>
						</view>
						<!--代收贷款信息-->
						<view v-if="formData.waybillValueAdd.agentFlag!='0'||!formData.waybillValueAdd.agentFlag" style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">代收贷款信息</text>
							<view
								style="display: flex;flex-direction: column;width: 100%;color: #6f6f6f;margin: 8px;font-size: 12px;">
								<view style="display: flex;">
									<text>代收账号：</text>
									<text style="margin-left: 10px;">{{formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessAccount:'无'}}</text>
								</view>
								<view style="display: flex;">
									<text>代收账号户名：</text>
									<text style="margin-left: 10px;">{{formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessAccountName:'无'}}</text>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>代收费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessFee:0).toFixed(2)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>代收服务费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessServiceFee:0).toFixed(2)}}</text>
									</span>
								</view>
							</view>
						</view>
						<!--其它信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">其他信息</text>
							<view
								style="display: flex;flex-direction: column;width: 100%;color: #6f6f6f;margin: 8px;font-size: 12px;">
								<view style="display: flex;">
									<text style="flex: 1;">结算方式：</text>
									<text style="flex: 3;" v-if="formData.waybillFee?formData.waybillFee.settlementMode=='1':false">现付{{Number(formData.waybillFee.cod).toFixed(2)}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee?formData.waybillFee.settlementMode=='2':false" >到付{{Number(formData.waybillFee.pod).toFixed(2)}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee?formData.waybillFee.settlementMode=='3':false" >欠付{{Number(formData.waybillFee.poa).toFixed(2)}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee?formData.waybillFee.settlementMode=='4':false" >回单付{{Number(formData.waybillFee.pom).toFixed(2)}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee?formData.waybillFee.settlementMode=='5':false" >月结{{Number(formData.waybillFee.ms).toFixed(2)}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee?formData.waybillFee.settlementMode=='7':false" >混合付</text>
									<text style="flex: 3;" v-else>--</text>
								</view>
								<view style="display: flex;">
									<text style="flex: 1;">建单人：</text>
									<span style="flex: 3;">
										<text>{{formData.createBy}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<text style="flex: 1;">创建时间：</text>
									<text style="flex: 3;">{{formData.createTime}}</text>
								</view>
								<view style="display: flex;">
									<text style="flex: 1;">备注：</text>
									<text style="flex: 3;">{{formData.remark}}</text>
								</view>
							</view>
						</view>
						<!--底部按钮组-->
						<!--提货&调度-->
						<!--待提货(111)-->
						<!-- <view v-if="formData.status==111"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 100%;height: 60px;justify-content: center;">
								<view  @click="completePick" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									开始提货</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view v-if="formData.scheduleStatus=='0'||formData.scheduleStatus=='440'" @click="completeDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									车辆调度</view>
								<view v-else @click="cancelDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消调度</view>
							</view>
						</view> -->
						<!--提货&调度&装车-->
						<!--(提货完成)待装车(120)-->
						<view v-if="formData.status==112"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<!-- <view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="canclePick" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消提货</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view v-if="formData.scheduleStatus=='0'||formData.scheduleStatus=='440'" @click="completeDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									车辆调度</view>
								<view v-else @click="cancelDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消调度</view>
							</view> -->
							<view
								style="display: flex;align-items: center;width: 100%;height: 60px;justify-content: center;">
								<view @click="truckLoading" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									装车</view>
							</view>
						</view>
						<!--取消装车&发车-->
						<!--(提货中)待发车(120)-->
						<!-- <view v-else-if="formData.status==120"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="cancleTruckLoading" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消装车</view>
									
								<view @click="canclePick" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消提货</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="depart" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view>
							</view>
						</view> -->
						<!--取消发车&到达-->
						<!--(已发车)在途中(140)-->
						<!-- <view v-else-if="formData.status==140"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="cancleDepart" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消发车</view>
								<view  @click="dispatch" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="arrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									到达</view>
							</view>
						</view> -->
						<!--取消发车&到达-->
						<!--中转(160)-->
						<view v-else-if="formData.status==160"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view  @click="depart" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view>
								<!-- <view @click="cancleDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 110px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消发车</view> -->
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="unload" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									卸车</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="cancleArrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消到达</view>
									
								<!-- <view @click="arrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									到达</view> -->
							</view>
						</view>
						<!--取消发车&到达-->
						<!--短驳(170)-->
						<!-- <view v-else-if="formData.status==170"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view  @click="depart" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view>
								<view @click="cancleDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 110px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消发车</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="unload" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									卸车</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="cancleArrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消到达</view>
									
								<view @click="arrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									到达</view>
							</view>
						</view> -->
						<!--取消到达&配送-->
						<!--到达(180)-->
						<view v-else-if="formData.status==180"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<!-- <view @click="cancleArrive" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消到达</view> -->
								<view @click="signIn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									签收</view>
								
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view v-if="formData.unLoadId=='0'" @click="unload" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									卸车</view>
								<view v-else @click="cancelUnload" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消卸车</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<!-- <view v-if="formData.unLoadId=='0'" @click="unload" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									卸车</view>
								<view v-else @click="cancelUnload" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消卸车</view> -->
									
								<view  @click="uploadReceipt" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									<!-- <span v-if="formData.receiptAttachments==null||formData.receiptAttachments==''">上传回单</span>
									<span v-else>重新上传</span> -->
									确认上传
								</view>
								<!-- <view @click="agency" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									代收贷款</view> -->
								
								
								<!-- <view @click="salesReturn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									退货</view> -->
							</view>
						</view>
						<!--取消到达&配送-->
						<!--签收(200)-->
						<view v-else-if="formData.status==200"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="cancelSignIn" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消签收</view>
								<!-- <view @click="completeWaybill" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									完成运单</view> -->
								
							</view>
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view  @click="uploadReceipt" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									<span v-if="formData.receiptAttachments==null||formData.receiptAttachments==''">上传回单</span>
									<span v-else>重新上传</span>
								</view>
								<!-- <view @click="agency" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									代收贷款</view> -->
								<!-- <view @click="salesReturn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									退货</view> -->
							</view>
						</view>
						<!--退货-->
						<!--完成(230)-->
						<!-- <view v-else-if="formData.status==230"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 100%;height: 60px;justify-content: center;">
								<view @click="salesReturn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									退货</view>
							</view>
						</view> -->
					</view>
					<!-- <view v-else-if="index_==1">

					</view> -->
					<view v-else-if="index_==1">
						<!-- <WaybillTrack :data="formData" :scheduleId="formData.scheduleVo?formData.scheduleVo.scheduleId:''" ref="waybillTrack"/> -->
						<view style="position: relative;display: flex;flex-direction: row;align-items: center;padding: 12px 10px;font-weight: 400;">
							<view style="width: 4px;height: 12px;border-radius: 10px;background-color: #2979ff;margin-right: 6px"></view>
							<view style="display: flex;flex-direction: column;flex: 1;color: #333;">运单跟踪</view>
						</view>
						<!-- <view @click="goWaybillTrack" hover-class="buttonHover" style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<view>查看运单跟踪</view>
						</view> -->
						<view @click="goWaybillTrack" hover-class="buttonHover" style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<view style="display: flex;justify-content: space-between;">查看运单跟踪<uni-icons type="right" size="16" color="#8f939c"></uni-icons></view>
							<image src="../../../static/waybill/trackBG.png" style="height: 280px;width: 300px;display: block;margin: 0 auto;"></image>
						</view>
					</view>
				</scroll-view>
			</swiper-item>
			<swiper-item v-for="(item,index) in moreItemArr" :key="'item'+index">
				<scroll-view scroll-y="true" show :style="'height:' + scrollH + 'px;'">
					<view v-if="index===0">
						<WaybillLog :waybillId="waybillId" ref="waybillLog"/>
					</view>
					<view  v-else-if="index===1">
						<!--车辆调度-->
						<view style="position: relative;display: flex;flex-direction: row;align-items: center;padding: 12px 10px;font-weight: 400;">
							<view style="width: 4px;height: 12px;border-radius: 10px;background-color: #2979ff;margin-right: 6px"></view>
							<view style="display: flex;flex-direction: column;flex: 1;color: #333;">车辆调度</view>
						</view>
						<view v-if="formData.scheduleStatus!='0'&&formData.scheduleStatus!='440'">
							<!--车次信息-->
							<view @click="toDispatchDetails(formData.scheduleVo.scheduleId)" style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
								<view>发车批次：{{formData.scheduleNo}}<text @click.stop="copy(formData.scheduleNo)" class="copy">复制</text></view>
								<view>{{formData.scheduleVo.driverVo.driverName}}/{{formData.scheduleVo.driverVo.phoneNumber}}
								</view>
								<view>车牌号：{{formData.scheduleVo.carVo.licensePlate}}</view>
								<view style="display: flex;">
									<!-- <text
										style="background-color: #6699ff;color: #ffffff;padding: 2px 5px;border-radius: 6px;">{{headType[formData.scheduleVo.carVo.headType]}}</text> -->
									<text
										style="background-color: #00cc99;color: #ffffff;padding: 2px 5px;border-radius: 6px;">{{carType_[formData.scheduleVo.carVo.carType]}}{{formData.scheduleVo.carVo.carLength}}米</text>
									<text
										style="background-color: #0099ff;color: #ffffff;padding: 2px 5px;border-radius: 6px;margin-left: 5px;">{{formData.scheduleVo.carVo.loadCapacity}}吨{{formData.scheduleVo.carVo.volume}}立方米</text>
								</view>
								<!-- <text>车辆定位:</text> -->
								<view>
									调度时间：
									<text>{{formData.scheduleVo?formData.scheduleVo.createTime:'--'}}</text>
								</view>
								<view>
									运输线路：
									<!-- <text v-for="(item__,index__) in formData.scheduleVo.lineVo.stationList"
										:key="index__">{{item__.branchDept.deptName}}→</text> -->
									<text>{{formData.scheduleVo.lineVo?formData.scheduleVo.lineVo.lineName:'无'}}</text>
								</view>
							</view>
						</view>
						<view v-else>
							<view style="display: flex;justify-content: center;align-items: center;height: 200px;">
								当前未调度
							</view>
						</view>
					</view>
					<view v-else-if="index===2">
						<ReceiptLog :waybillId="waybillId" ref="receiptLog"/>
					</view>
					<view v-else-if="index===3">
						<SignLog :data="formData"/>
					</view>
				</scroll-view>
			</swiper-item>
		</swiper>
		<!-- 顶部操作弹窗 -->
		<uni-popup ref="popup" background-color="#fff" @maskClick="closeToggle">
			<view style="margin-top: 40px;border-radius: 20px;">
				<view style="display: flex;flex-wrap: wrap;margin: 0 auto;width: 100%;">
					<view v-for="(item,index) in moreItemArr" :key="index">
						<view @click="clickMoreItem(index)"
							style="width: 75px;height: 30px;display: flex;justify-content: center;align-items: center;margin: 10px;">
							<view :class="{'active':(index+1)==tabIndex}">
								{{item}}
							</view>
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
		<!--弹窗组件-->
		<!-- <Pick ref="pick" :data="formData" :data_pickup="formData_pickup" :waybillId="waybillId" :carType_="carType_"/>
		<Dispatch  ref="dispatch" :data="formData" :waybillId="waybillId" :carType_="carType_"/>
		<Depart ref="depart" :data="formData" :carType_="carType_"/>
		<Arrive ref="arrive" :data="formData" :carType_="carType_"/> -->
		<Unload ref="unload" :data="formData" :waybillId="waybillId" />
		<Sign ref="sign" :data="formData" :waybillId="waybillId" />
		<UploadReceipt ref="uploadReceipt" :data="formData" />
		<!-- <CompleteWaybill ref="completeWaybill" :data="formData" /> -->
	</div>
</template>

<script>
	import {
		getWayBillDetails,
		updateWayBillPickup,
		putWayBillStatus,
		putScheduleStatus,
		waybillTruckLoading,
		cancelWaybillTruckLoading,
		waybillDepart,
		cancelWaybillDepart,
		waybillArrive,
		cancelWaybillArrive,
		uploadReceipt,
		signWaybill,
		deleteSignWaybill,
		completeWaybill
	} from '@/api/system/waybill.js'
	
	import {getCarrierCarList} from '@/api/system/driver.js'
	import {getDicts} from '@/api/system/dict.js'
	
	import myfilepicker from '@/components/uploadFile/uploadFile.vue'
	
	import Pick from './components/pick.vue'
	import Dispatch from './components/dispatch.vue'
	import Depart from './components/depart.vue'
	import Arrive from './components/arrive.vue'
	import Unload from './components/unload.vue'
	import Sign from './components/sign.vue'
	import UploadReceipt from './components/uploadReceipt.vue'
	import CompleteWaybill from './components/completeWaybill.vue'
	import WaybillLog from '@/pages/operation/waybillDetails/waybillLog.vue'
	import WaybillTrack from '@/pages/operation/waybillDetails/waybillTrack.vue'
	import ReceiptLog from '@/pages/operation/waybillDetails/receiptLog.vue'
	import SignLog from '@/pages/operation/waybillDetails/signLog.vue'
	export default {
		components: {
			myfilepicker,
			Pick,
			Dispatch,
			Depart,
			Arrive,
			Unload,
			Sign,
			UploadReceipt,
			CompleteWaybill,
			WaybillLog,
			WaybillTrack,
			ReceiptLog,
			SignLog
		},
		data() {
			return {
				//itemsArr: ['运单信息', '车辆调度'],
				itemsArr: ['运单信息'],
				// moreItemArr: [ '回单跟踪',  '运单评价', '运单日志',  '签收信息'],
				moreItemArr: ['运单日志','车辆调度', '回单跟踪',  '签收信息'],
				tabIndex: 0,
				scrollH: 700,
				scrollInto: '',
				openMore: true,
				formData:{
					waybillValueAdd:{
						agentFlag:''
					},
					pickupVo:{},
					goodSourceList:[],
					scheduleVo:{
						carVo:{},
						carrierVo:{},
						driverVo:{},
						feeList:[],
						lineVo:{}
					},
					waybillFee:{}
				},
				//提货
				formData_pickup: {},
				//下拉框 ->所属客户
				type: [],
				//车头
				headType: [],
				//下拉框 ->车型
				carType: [],
				carType_:[],
				//运单类型
				waybillType:[],
				//运单状态
				status:[],
				//货物类型
				goodsType:[],
				//包装类型
				packingType:[],
				//下拉框->车牌号
				plateNumber:[],
				
				waybillId:'',
			}
		},
		onLoad(e) {
			uni.getSystemInfo({
				success: res => {
					this.scrollH = res.windowHeight - 40;
				}
			});
			
			if (e.waybillId) {
				uni.showLoading({
					title: '正在加载',
				})
				this.waybillId=e.waybillId
				//获取运单详情
				getWayBillDetails(e.waybillId).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						this.formData = res.data
						this.formData_pickup=res.data.pickupVo||{}
						
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			}
		},
		created() {
			//加载运单类型
			getDicts('waybill_type').then(res=>{
				res.data.forEach(item=>{
					this.waybillType[item.dictValue]=item.dictLabel
				})
			})
			//加载运单状态
			getDicts('waybill_status').then(res=>{
				res.data.forEach(item=>{
					this.status[item.dictValue]=item.dictLabel
				})
			})
			//加载货物类型
			getDicts('goods_type').then(res=>{
				res.data.forEach(item=>{
					this.goodsType[item.dictValue]=item.dictLabel
				})
			})
			//加载包装类型
			getDicts('packing_type').then(res=>{
				res.data.forEach(item=>{
					this.packingType[item.dictValue]=item.dictLabel
				})
			})
			//车型
			getDicts('car_type').then(res=>{
				this.carType=res.data.map(item=>{
					return {
						value:item.dictValue,
						text:item.dictLabel
					}
				})
				res.data.forEach(item=>{
					this.carType_[item.dictValue]=item.dictLabel
				})
			})
			//加载车头状态
			getDicts('head_type').then(res => {
				res.data.forEach(item => {
					this.headType[item.dictValue] = item.dictLabel
				})
			})
		},
		computed: {
			totalPrice() {
				let totalCarriageFee=Number(this.formData.totalCarriageFee||0)  //总运费
				let totalPackingFee=Number(this.formData.totalPackingFee||0)    //总包装费
				let shipPickUpFee=Number(this.formData.shipPickUpFee||0)        //提货费
				let deliveryPickUpFee=Number(this.formData.deliveryPickUpFee||0) //送货费
				if(!this.formData.waybillValueAdd)
				{
					let totalMoney=totalCarriageFee+totalPackingFee+shipPickUpFee+deliveryPickUpFee;
					return totalMoney.toFixed(2);
				}
				else
				{
					let receiptFee=Number(this.formData.waybillValueAdd.receiptFee||0) //回单费
					let warehouseFee=Number(this.formData.waybillValueAdd.warehouseFee||0)  //仓储费
					let loadingFee=Number(this.formData.waybillValueAdd.loadingFee||0)   //装货费
					let unloadFee=Number(this.formData.waybillValueAdd.unloadFee||0)   //卸货费
					let drayage=Number(this.formData.waybillValueAdd.drayage||0)      //短驳费
					let parcelInsuranceFee=Number(this.formData.waybillValueAdd.parcelInsuranceFee||0)	//保价费
					let otherFee=Number(this.formData.waybillValueAdd.otherFee||0)	//其他费用
					let totalMoney=totalCarriageFee+totalPackingFee+shipPickUpFee+deliveryPickUpFee+receiptFee+warehouseFee+loadingFee+unloadFee+drayage+parcelInsuranceFee+otherFee;
					return totalMoney.toFixed(2);
				}
			}
		},
		methods: {
			async init(){
				//获取运单详情
				await getWayBillDetails(this.waybillId).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						this.formData = res.data
						this.formData_pickup=res.data.pickupVo||{}
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}	
				})
			},
			//接受提交后跳转的顶部导航栏位置
			otherFun() {
				this.init()
			},
			// 切换选项
			changeTab(index) {
				if (this.tabIndex === index) {
					return;
				}
				switch (index){
					case 2:
						this.$refs.waybillLog[0].getList()
						break;
					case 3:
						//跳转单独页面
						// uni.navigateTo({
						// 	url:'/pages/operation/waybillDetails/waybillTrack?data='+JSON.stringify(this.formData)+'&scheduleId='+(this.formData.scheduleVo?this.formData.scheduleVo.scheduleId:'')
						// })
						//this.$refs.waybillTrack[0].getList()
						//this.$refs.waybillTrack[0].getLanLatInit()
						break;
					case 4:
						this.$refs.receiptLog[0].getList()
						break;
					default:
						break;
				}
				this.tabIndex = index;
				// 滚动到指定元素
				this.scrollInto = 'tab' + index;
			},
			// 监听滑动
			onChangeTab(e) {
				uni.showLoading({
					title: '正在加载',
				})
				setTimeout(function() {
					uni.hideLoading()
				}, 500);
				this.changeTab(e.detail.current);
			},
			//点击更多
			openToggle() {
				// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
				this.$refs.popup.open('top')
				this.openMore = false
			},
			//关闭更多
			closeToggle() {
				this.$refs.popup.close()
				this.openMore = true
			},
			goWaybillTrack(){
				//跳转单独页面
				uni.navigateTo({
					url:'/pages/operation/waybillDetails/waybillTrack?data='+JSON.stringify(this.formData)+'&scheduleId='+(this.formData.scheduleVo?this.formData.scheduleVo.scheduleId:'')
				})
			},
			//点击更多里的子项
			clickMoreItem(index) {
				switch (index){
					case 0:
						this.$refs.waybillLog[0].getList()
						break;
					case 1:
						//跳转单独页面
						// uni.navigateTo({
						// 	url:'/pages/operation/waybillDetails/waybillTrack?data='+JSON.stringify(this.formData)+'&scheduleId='+(this.formData.scheduleVo?this.formData.scheduleVo.scheduleId:'')
						// })
						//this.$refs.waybillTrack[0].getList()
						//this.$refs.waybillTrack[0].getLanLatInit()
						break;
					case 2:
						this.$refs.receiptLog[0].getList()
						break;
					default:
						break;
				}
				index += 1;
				this.tabIndex = index
			},
			//手动关闭dialog
			closeDialog(name){
				this.$refs[name].close()
			},
			//完成提货
			completePick(){
				this.$refs.pick.completePick()
			},
			//取消提货
			canclePick(){
				this.$refs.pick.canclePick()
			},
			//确认取消提货
			cancelPickDialogConfirm(){
				this.$refs.dispatch.cancelDispatch()
			},
			//车辆调度
			completeDispatch(){
				uni.navigateTo({
					url:'/pages/operation/waybillDetails/carDispatch?waybillIds='+this.waybillId
				})
			},
			//取消调度
			cancelDispatch() {
				this.$refs.cancelDispatchDialog.open()
			},
			//装车
			truckLoading(){
				this.$refs.truckLoading.truckLoading()
			},
			//取消装车
			cancleTruckLoading(){
				this.$refs.truckLoading.cancleTruckLoading()
			},
			//发车
			depart(){
				this.$refs.depart.depart()
			},
			//取消发车
			cancleDepart(){
				this.$refs.depart.cancleDepart()
			},
			//到达
			arrive(){
				this.$refs.arrive.arrive()
			},
			//取消到达
			cancleArrive(){
				this.$refs.arrive.cancleArrive()
			},
			//签收
			signIn(){
				this.$refs.sign.signIn()
			},
			//取消签收
			cancelSignIn(){
				this.$refs.sign.cancelSignIn()
			},
			//卸车
			unload(){
				this.$refs.unload.unload()
			},
			//取消卸车
			cancelUnload(){
				this.$refs.unload.cancelUnload()
			},
			//代收贷款
			agency(){
				
			},
			//上传回单
			uploadReceipt(){
				this.$refs.uploadReceipt.uploadReceipt()
			},
			//完成运单
			completeWaybill(){
				this.$refs.completeWaybill.completeWaybill()
			},
			//退货
			salesReturn(){
				let that=this
				uni.showModal({
					title: '提示',
					content: '是否跳转退货运单页面填写退货详情？',
					success: function(res) {
						if (res.confirm) {
							uni.showLoading({
								title: '正在跳转...',
							})
							
							setTimeout(()=>{
								uni.navigateTo({
									url: '/pages/operation/addReturnWaybill/addReturnWaybill?waybillId=' + that.waybillId
								})
							},1000)
						}
					}
				});
			},
			//车次详情
			toDispatchDetails(scheduleId){
				uni.navigateTo({
					url:'/pages/operation/dispatchDetails/dispatchDetails?scheduleId='+scheduleId
				})
			},
			//复制
			copy(text) {
				uni.setClipboardData({
				 data: text,
					success: function(res) {
						uni.showToast({
				 		    title: '已复制',
							icon:'success'
						});
					}
				});
			}
		},
	}
</script>

<style scoped>
	.pagecontrol-top-scroll {
		height: 40px;
		width: 100%;
		white-space: nowrap;
		box-sizing: border-box;
		border-bottom: 1rpx solid #ededed;
		background-color: #f8f8f8;
		position: relative;
		z-index: 999;
	}

	.pagecontrol-top-title {

		height: 100%;
		width: 100%;
		display: flex;
		justify-content: space-around;
	}

	.pagecontrol-top-text {
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	.pagecontrol-top-normal {
		color: #656565;
		font-size: 16px;
	}

	.pagecontrol-top-selected {
		color: #000000;
		font-weight: bold;
		font-size: 16px;
	}

	.pagecontrol-bottom-line {
		width: 30vw;
		/* width: 16vw; */
		height: 3px;
		margin-top: 8px;
		background-color: #bf5f09;
		border-radius: 11px;
	}

	.pagecontrol-bottom-line-show {
		visibility: visible;
	}

	.pagecontrol-bottom-line-visibility {
		visibility: hidden;
	}

	.buttonHover {
		opacity: 0.6;
	}

	.active {
		border-radius: 8px;
		border: 1px solid #bf5f09;
		color: #bf5f09;
		padding: 4px 8px;
	}

	.contract::after {
		content: "";
		position: absolute;
		width: 0;
		height: 0;
		left: 190px;
		border-right: 3px solid transparent;
		border-bottom: 30px solid transparent;
		border-left: 16px solid #d9d9d9;
	}

	::v-deep .uni-border-left{
	    border-left-color: #f0f0f0;
	    border-left-style: solid;
	    border-left-width: 1px;
	    background-color: rgb(157,81,38);
	    border-radius: 0 0 11px 0;
	    /* color: white; */
	}
	::v-deep .uni-button-color{
	    color: #ffffff;
	}
	::v-deep .file-title{
	    font-size: 12px;
	    color: #333;
	}
	.copy{
		margin-left: 15px;
		color: #078cc5;
	}
	.copy:active{
		opacity: 0.6;
	}
</style>